<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>

        .hezi {
            margin: 60px auto;
            width: 200px;
            height: 200px;
            /* border: 1px solid rgb(46, 171, 230); */
            /* background: #000; */
        }
    </style>
</head>

<body>
    <div class="box">
        <div class="hezi">
            <h2>恭喜您，登陆成功</h2>
            <span id="jumpTo" style="color:red; font-size: 30px;"><b>10</b></span>秒后自动返回首页
            <p><button>立即返回</button></p>
        </div>
    </div>
</body>
<script>
    window.onload = function () {
        let time = 10;
        setInterval(() => {
            time--;
            document.getElementById("jumpTo").innerText = time;
            if (time == 0) {
                location.href = '/src/html/frontEnd/index.html'
            }
        }, 1000);
    }
    document.getElementsByTagName("button")[0].onclick = function () {
                location.href = '/src/html/frontEnd/index.html'

    }

</script>

</html>